<%= render :partial => "entry", :object => @entry %>
<!-- begin comments -->
<div class="post">
  <h2><a id="comments">Comments</a></h2>
  <% for comment in @entry.comments %>
    <a id="comment-<%= comment.id %>"></a>
    <p><%= h comment.comment %>
    <p class="posted">
      Posted by: <%= link_to h(comment.name), comment.website %> @ <%= comment.created_at.to_s(:long) %>
    </p>
  <% end %>
</div>
<!-- end comments -->
<% if flash[:notice] -%>
  <div id="notice"><%= flash[:notice] %></div>
<% end -%>
<%= error_messages_for :comment %>
<% form_for(:comment, :url => {:action => :create_comment}) do |f| %>
  <%= f.hidden_field :commentable_id %>
  <div class="post">
    <p>
      <label for="author">Name (required) </label><br/>
      <%= f.text_field :name, :size => 40 %>
    </p>
    <p>
      <label for="mail">Mail (Will not be published) (Required) </label><br/>
      <%= f.text_field :mail, :size => 40 %>
    </p>
    <p>
      <label for="website">Website </label><br/>
      <%= f.text_field :website, :size => 40 %>
    </p>  
  
    <p>
      <label for="comment">Comment </label><br/>
      <%= f.text_area :comment, :rows => 3, :cols => 50 %>
    </p>
    <p>
      <%= submit_tag "Submit Comment", :disablewith => "please wait..." %>
    </p>
  </div>
<% end %>